#include <iostream>
#include <memory>

using std::cout;
using std::endl;
using std::make_shared;
using std::shared_ptr;

class A
{
public:
    int _i{10};
};

class B : public A
{
public:
    double _d{1.1};
};

int main(int args, char *argv[])
{
    auto ptr = make_shared<A>();
    cout << ptr->_i << endl;
    shared_ptr<B> bPtr = std::reinterpret_pointer_cast<B>(ptr);
    // shared_ptr<B> bPtr = std::dynamic_pointer_cast<B>(ptr);
    return 0;
}